var status = -1;
var level = "20";
var header = "#fn黑体##fs32#B - " + level + " F\r\n\r\n";

function action(e, d, c) {
    status++;
    var b = cm.getEventManager("副本_起源之塔");
    var f = b == null ? null : b.getProperty("stage" + level);
    if (f != null && f.equals("start")) {
        cm.dispose();
        return
    }
    if (cm.getInfoQuest(42001).contains("noHelp=1")) {
        startMap(b);
        return
    }
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false);
            cm.setStandAloneMode(true);
            cm.inGameDirectionEvent_AskAnswerTime(30)
        } else {
            if (status === a++) {
                cm.fieldEffect_InsertCanvas(1, 128, 0, 0, 0, 1000, 0);
                cm.inGameDirectionEvent_AskAnswerTime(1000)
            } else {
                if (status === a++) {
                    cm.inGameDirectionEvent_Monologue(header + "#fs22#第20层正由铁皮人守护着，他是我很喜爱的童话书中的人物。\r\n\r\n铁皮人的行动很缓慢，所以很容易避开他的攻击，不过一旦被击中就会受到很大的伤害。\r\n\r\n铁皮人每隔一段时间就需要上一次油漆，所以桃乐丝会召唤幻影出来，为他上油漆。\r\n\r\n就在桃乐丝为铁皮人上油漆的时候，你通过推拉敌人的攻击进行妨碍，使上油漆无法进行。", 30000)
                } else {
                    if (status === a++) {
                        cm.fieldEffect_InsertCanvas(0, 0, 0, 0, 1000, 0, 0);
                        cm.curNodeEventEnd(true);
                        cm.setInGameDirectionMode(false, true);
                        cm.setStandAloneMode(false);
                        startMap(b)
                    } else {
                        cm.dispose()
                    }
                }
            }
        }
    }
}

function startMap(a) {
    cm.dispose();
    cm.updateHeaderUI(1, 2, cm.getEventInstance().getTimeLeft(), 0, cm.getEventInstance().getTimeLeft(), 42011);
    a.setProperty("stage" + level, "start");
    cm.getMap().getWeatherEffectNotice("请消灭铁皮人。", 147, 60000, 1);
    cm.fieldEffect_ScreenMsg("UI/UIWindowPL.img/HiddenCatch/StageImg/start");
    var b = a.getMonster(9309205);
    b.setOverrideStats(modified);
    cm.getMap().spawnMonsterOnGroundBelow(b, new java.awt.Point(1000, 0))
}

function start() {
    status = -1;
    action(1, 0, 0)
};